﻿using System;
using System.Collections.Generic;
using Scrum.Net.Interfaces;
using Scrum.Net.Utilities;

namespace Scrum.Net.Classes
{
    public class User : ObservableObject, IUser
    {
        private string _name;
        private string _id;
        private IScrumRole _role;
        private readonly IDictionary<DateTime, String> _daysOff;
        private float _availableHours;

        public String Name
        {
            get { return _name; }
            set
            {
                _name = value;
                RaisePropertyChanged("Name");
            }
        }

        public IScrumRole Role
        {
            get { return _role; }
            set
            {
                _role = value;
                RaisePropertyChanged("Role");
            }
        }

        public string Id
        {
            get { return _id; }
            set
            {
                _id = value;
                RaisePropertyChanged("Id");
            }
        }

        public float AvailableHours
        {
            get { return _availableHours; }
            set
            {
                _availableHours = value;
                RaisePropertyChanged("AvailableHours");
            }
        }

        public IDictionary<DateTime, String> DaysOff
        {
            get { return _daysOff; }
        }

        public User(String name)
        {
            _name = name;
            _daysOff = new Dictionary<DateTime, String>();
        }
    }
}